LATEX= pdflatex
PDFCROP = pdfcrop
DOCS= common proof1 proof2 proof3 \
      proof4 proof5 proof6 proof7
CROPS= proof1-crop proof2-crop \
       proof3-crop proof4-crop \
       proof5-crop proof6-crop \
       proof7-crop
RM= rm -rf

all:
	$(MAKE) $(CROPS)

proof1:
	$(LATEX) proof1.tex
	$(LATEX) proof1.tex

proof2:
	$(LATEX) proof2.tex
	$(LATEX) proof2.tex

proof3:
	$(LATEX) proof3.tex
	$(LATEX) proof3.tex

proof4:
	$(LATEX) proof4.tex
	$(LATEX) proof4.tex

proof5:
	$(LATEX) proof5.tex
	$(LATEX) proof5.tex

proof6:
	$(LATEX) proof6.tex
	$(LATEX) proof6.tex

proof7:
	$(LATEX) proof7.tex
	$(LATEX) proof7.tex

proof1-crop: proof1
	$(PDFCROP) proof1.pdf

proof2-crop: proof2
	$(PDFCROP) proof2.pdf

proof3-crop: proof3
	$(PDFCROP) proof3.pdf

proof4-crop: proof4
	$(PDFCROP) proof4.pdf

proof5-crop: proof5
	$(PDFCROP) proof5.pdf

proof6-crop: proof6
	$(PDFCROP) proof6.pdf

proof7-crop: proof7
	$(PDFCROP) proof7.pdf

clean:
	$(foreach DOC,$(DOCS), \
	$(RM) $(DOC).aux $(DOC).log $(DOC).out $(DOC).toc \
	$(DOC).pdf $(DOC)-crop.pdf)
